<template>
  <div class="homeswiper">
    <swiper :options="swiperOption">
      <!-- slides -->
      <swiper-slide v-for="item in imgList" :key="item.id">
        <img :src="item.imgUrl" class="swiperImg"/>
      </swiper-slide>
      <!-- Optional controls -->
      <div class="swiper-pagination"  slot="pagination"></div>
    </swiper>
  </div>
</template>
<script>
export default {
  name: 'HomeSwiper',
  props: {
    imgList: Array
  },
  data: function () {
    return {
      swiperOption: {
        pagination: '.swiper-pagination',
        loop: true,
        autoplay: 3000
      }
    }
  }
}
</script>
<style lang="stylus" scoped>
  .homeswiper >>> .swiper-pagination-bullet-active
                    background-color #ffffff;
  .homeswiper
    overflow hidden
    width 100%
    height 0
    padding-bottom 34.3%
    .swiperImg
      width:100%;
</style>
